package com.pansoft.openplanet.bean;

import com.efounder.utils.ResStringUtil;
import com.pansoft.openplanet.R;

import java.util.List;

public class CardBean {
    /**
     * 卡片类型,普卡0，金卡1，铂金卡2，星际卡3
     */
    public static final String CARD_TYPE_COMMON = "1";
    public static final String CARD_TYPE_GOLD = "2";
    public static final String CARD_TYPE_PLATINUM = "3";
    public static final String CARD_TYPE_STAR = "4";
    /**
     * 卡片写入的次数，累加1
     */
    private String version;
    private String uid;
    private String cardType;
    private String userId;
    private List<CardWalletInfo> walletInfoList;
    private boolean enable;

    /**
     * 显示数字
     */
    private boolean isShowNum;

    public CardBean() {
    }

    public String getVersion() {
        return version;
    }

    public void setVersion(String version) {
        this.version = version;
    }

    public String getUid() {
        return uid;
    }

    public void setUid(String uid) {
        this.uid = uid;
    }

    public String getCardType() {
        return cardType;
    }

    public void setCardType(String cardType) {
        this.cardType = cardType;
    }

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public List<CardWalletInfo> getWalletInfoList() {
        return walletInfoList;
    }

    public void setWalletInfoList(List<CardWalletInfo> walletInfoList) {
        this.walletInfoList = walletInfoList;
    }

    public boolean isShowNum() {
        return isShowNum;
    }

    public void setShowNum(boolean showNum) {
        isShowNum = showNum;
    }

    public boolean isEnable() {
        return enable;
    }

    public void setEnable(boolean enable) {
        this.enable = enable;
    }

    /**
     * 获取卡片类型的名称
     */
    public static String getCardTypeName(String cardType) {
        if ("".equals(cardType) || CARD_TYPE_COMMON.equals(cardType)) {
            return ResStringUtil.getString(R.string.open_planet_card_class_common);
        }
        if (CARD_TYPE_GOLD.equals(cardType)) {
            return ResStringUtil.getString(R.string.open_planet_card_class_gold);
        }
        if (CARD_TYPE_PLATINUM.equals(cardType)) {
            return ResStringUtil.getString(R.string.open_planet_card_class_platinum);
        }
        if (CARD_TYPE_STAR.equals(cardType)) {
            return ResStringUtil.getString(R.string.open_planet_card_class_star);
        }
        return ResStringUtil.getString(R.string.open_planet_card_class_common);
    }
}
